
//对外暴露所配置的常量路由
export const constantRouter = [
  {
    path: '/login',
    component: () => import('../views/login/index.vue'),
    name: 'login',  //命名路由，做权限路由可用到
    //路由元信息（用于展示菜单标题）
    meta: {
      title: '登录',
      hidden: true,//代表路由标题在菜单中是否隐藏，ture隐藏，false显示
      icon: 'SuitcaseLine'
    }
  },
  //登录成功展示的首页路由
  {
    path: '/',
    component: () => import('../layout/index.vue'),
    name: 'home',
    // 重定向
    // redirect: '/home',
    //路由元信息（用于展示菜单标题）
    meta: {
      title: '首页',
      hidden: false,
      icon: 'HomeFilled'
    },
    children: [
      {
        path: '',
        name: 'home',
        component: () => import('../views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false    //代表路由标题在菜单中是否隐藏，ture隐藏，false显示
        },
      }
    ]
  },
  {
    path: '/screen',
    component: () => import('../layout/index.vue'),
    name: 'Screen',
    meta: {
      title: '数据大屏',
      hidden: false,
      icon: 'Folder'
    },
    children: [
      {
        path: '',
        name: 'screen',
        component: () => import('../views/screen/index.vue'),
        meta: {
          title: '数据大屏',
          hidden: false    //代表路由标题在菜单中是否隐藏，ture隐藏，false显示
        },
      }
    ]
  },
  {
    path: '/acl',
    component: () => import('../layout/index.vue'),
    name: 'Acl',
    // 重定向
    // redirect: '/user',
    meta: {
      title: '权限管理',
      hidden: false,
      icon: 'Folder'
    },
    children: [
      {
        path: '/acl/user',
        component: () => import('../views/ad/user/index.vue'),
        name: 'User',
        meta: {
          title: '用户管理',
          hidden: false,
          icon: 'User'
        },
      },
      {
        path: '/acl/role',
        component: () => import('../views/ad/role/index.vue'),
        name: 'Role',
        meta: {
          title: '角色管理',
          hidden: false,
          icon: 'Avatar'
        },
      },
      {
        path: '/acl/permission',
        component: () => import('../views/ad/permission/index.vue'),
        name: 'Permission',
        meta: {
          title: '菜单管理',
          hidden: false,
          icon: 'Monitor'
        },
      },
    ]
  },
  {

    path: '/product',
    component: () => import('../layout/index.vue'),
    name: 'Product',
    // 重定向
    redirect: '/product/attr',
    meta: {
      title: '商品管理',
      hidden: false,
      icon: 'Goods'
    },
    children: [
      {
        path: '/product/bond',
        component: () => import('../views/product/bond/index.vue'),
        name: 'Bond',
        hidden: false,
        meta: {
          title: '品牌管理',
          hidden: false,
          icon: 'Orange'
        },
      },
      {
        path: '/product/attr',
        component: () => import('../views/product/attr/index.vue'),
        name: 'Trademark',
        hidden: false,
        meta: {
          title: '属性管理',
          hidden: false,
          icon: 'ChromeFilled'
        },
      },
      {
        path: '/product/sku',
        component: () => import('../views/product/sku/index.vue'),
        name: 'Sku',
        hidden: false,
        meta: {
          title: 'Sku管理',
          hidden: false,
          icon: 'Orange'
        },
      },
      {
        path: '/product/spu',
        component: () => import('../views/product/spu/index.vue'),
        name: 'Spu',
        hidden: false,
        meta: {
          title: 'SPU管理',
          hidden: false,
          icon: 'Orange'
        },
      },
    ]
  },
  {
    path: '/404',
    component: () => import('../views/404/index.vue'),
    name: '404',
    meta: {
      title: '404',
      hidden: true,
      icon: 'Filter'
    },
  },
  //任意路由（上面所有的路由都不匹配时候，所展示的路由）
  {
    path: '/:pathMatch(.*)*',
    component: () => import('../views/404/index.vue'),
    name: 'any',
    // redirect: '/404',
    meta: {
      title: '任意路由',
      hidden: true,
      icon: 'Unlock'
    }

  }
]